package com.jy.web.diy.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jy.framework.utils.PageUtils;
import com.jy.web.diy.entity.AttributeEntity;
import com.jy.web.diy.entity.BaseInfoEntity;

import java.util.Map;
import java.util.List;
import java.util.Optional;

/**
 * 基础表
 *
 * @author JuiceYan
 * @email JuiceYan@jy.com
 * @date 2018-12-22 20:55:46
 */
public interface BaseInfoService extends IService<BaseInfoEntity> {
    List<String> getReservedAttributeNames();

    IPage<Map<String, Object>> selectValuesMapPage(Page page, Map<String, Object> conditionMap, boolean isAttribute);

    List<Map<String, Object>> selectValuesMaps(Map<String, Object> conditionMap);

    PageUtils getCategoryDataList(Map<String, Object> conditions, boolean isAttribute);

    void addDiyDataList(List<Map<String, Object>> attributes);

    List<Map<String, Object>> getAttributeMaps(String diyCategoryId);

    Optional<List<Map<String, Object>>> getTableInfo(Class entity);

    List<Map<String,Object>> getAttributeMaps(AttributeEntity entity);

    void saveBaseInfo(BaseInfoEntity entity);

    void updateBaseInfo(BaseInfoEntity entity);


    BaseInfoEntity getBaseInfoEntity(String id);

    void handleCategoryDatas(List<BaseInfoEntity> list);

    Map<String, Object> getCategoryDataInfo(String id);

    void saveBatchBaseInfos(List<Map<String, Object>> list, String diyCategoryId, boolean isAttribute);
    void saveOnseBaseInfo(Map<String, Object> categoryData, String s, String uuid);

    // PageUtils queryPage(Map<String, Object> paramsStr);

   // void deleteBatch(List<Long> ids);

    List<BaseInfoEntity> getQrDatas(String name);

}

